<?php
/**
 * Zanzo routing system =D
 */
error_reporting(E_ALL);
ini_set("display_errors", "1");

// Load our configuration
require_once('config.php');
// Load our core library
require_once('lib/util.php');
// Load the rest of our libraries
Utility::loadLibs('./lib/');
// Load our application libs
Utility::loadLibs('./app/');

// Make sure we don't get cached
Utility::sendNoCacheHeaders();

// Work out where we're going to
if (isset($_GET['myurl'])) $url = $_GET['myurl'];
else $url = '';

list ($resource, $action, $id ) = Utility::parseURL($url);
App::route($resource, $action, $id);
//Utility::runController($resource, $action, $id);